package com.lgc.demo.Md5;

import org.springframework.util.DigestUtils;

public class Md5Test {
    private static String salt = "sdfasdfaf.fasjjiuuyuifasdf";

    public static void main(String[] args) {
        String value = getMd5("fsda");

        value = getMd5("sdf");
    }

    public static String getMd5(String input) {
        String base = input + "/" + salt;
        String md5 = DigestUtils.md5DigestAsHex(base.getBytes());

        return md5;
    }
}
